#include <gtest/gtest.h>
#include <sstream>
#include "SharedMemory.hpp"

using namespace std;
TEST(RTPShareMemory, shareMemory) {
	return;
	SharedMemory shareMemory;
	auto ret = shareMemory.Init("/tmp/test_1", 1000, true);
	ASSERT_EQ(true, SharedMemory::IsSuccess(ret));
	int i = 0; 
	while(true) {
		sleep(1); 
		stringstream out;
		out<<"this is a test"<<(i % 10)<<"\n";
		shareMemory.Write((const uint8_t*)out.str().c_str(), out.str().size());
		printf("share len:%d\n", out.str().size());
		i++;
	}
}